<script setup lang="ts">
const props = defineProps({
  menu: {
    type: Object,
    default: null
  }
});
</script>

<template>
  <el-sub-menu :index="menu.path">
    <template #title>
      <span>{{ menu.menuName }}</span>
    </template>
    <template v-for="item in menu.children" :key="item.id">
      <el-menu-item v-if="item.menuType === 'C'" :index="item.path">
        <template #title>{{ item.menuName }}</template>
      </el-menu-item>
      <Menu v-if="item.menuType === 'M'" :menu="item" />
    </template>
  </el-sub-menu>
</template>

<style></style>
